#!/usr/bin/python
# -*-coding:utf-8-*-
import numpy as np
import pandas as pd

def transform_float64_to_float32(df):
    df = df.copy()

    colume_type = df.dtypes

    colume_type = colume_type[colume_type == np.float64]

    df[colume_type.index] = df[colume_type.index].astype(np.float32)

    return df

def transform_float64_to_float16(df):
    df = df.copy()

    colume_type = df.dtypes

    colume_type = colume_type[colume_type == np.float64]

    df[colume_type.index] = df[colume_type.index].astype(np.float16)

    return df

